package it.iubar.tkdscore;

import java.util.HashMap;

/**
 *
 * @author borgo
 */
class ControllerTimeHashMap {

    HashMap mapControllersAndButtons = null;

    public ControllerTimeHashMap() {
        this.mapControllersAndButtons = new HashMap();
    }

    public long get(String src_name, int src_index) {
        long l = 0;
        Object obj = this.mapControllersAndButtons.get(src_name);
        if (obj != null) {
            HashMap map = (HashMap) obj;
            Object time = map.get(src_index);
            if (time != null) {
                Long lg = (Long) time;
                l = lg.longValue();
            }
        }
        return l;
    }

    public void set(String src_name, int src_index, long l) {
        Long lg = Long.valueOf(l);
        HashMap map = null;
        Object obj = this.mapControllersAndButtons.get(src_name);
        if (obj != null) {
            map = (HashMap) obj;
        } else {
            map = new HashMap();
        }
        map.put(src_index, lg);
        this.mapControllersAndButtons.put(src_name, map);
    }
}
